<!DOCTYPE HTML>
[#include "../include/taglibs.html"/]
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>用户列表</title>
    [#include "../include/base_js_css.html"/]
    <link rel="stylesheet" type="text/css" href="${resource!}/css/user/user.css">
    <script type="text/javascript" src="${resource!}/js/user/user.js?1=1"></script>
  </head>
  <body style="overflow: auto;">
    <div class="top_content">
      <!-- 查询用户表单 -->
      <div class="easyui-panel" style="border-bottom: 0; height: 80px;" data-options="iconCls:'icon-search',collapsible:true,border: false" fit="true">
        <form id="user_search_form">
        <table>
          <tr>
            <td class="search_form_tdlf"><label for="account">账户</label></td>
            <td class="search_form_tdr"><input name="account" id="account" type="text"/></td>
            <td class="search_form_tdl"><label for="name">用户名</label></td>
            <td class="search_form_tdr"><input name="name" id="name" type="text"/></td>
            <td class="search_form_tdl"><label for="id">状态:</label></td>
            <td class="search_form_tdr"><input name="enabled" class="easyui-combobox" id="enabled" type="text" editable="false"
            data-options="panelHeight:'auto',valueField:'enabled',textField:'enabledView', data:[{enabled:'',enabledView:'请选择',selected:true},{enabled:1,enabledView:'激活',selected:true},{enabled:0,enabledView:'删除'}]" /></td>
          </tr>
          <tr>
            <td class="search_form_tdlf">&nbsp;</td>
            <td colspan="5"  class="search_form_tdr">
              <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" id="search_form_submit">查询</a>
              <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-reset" id="search_form_reset">重置</a>
            </td>
          </tr>
        </table>
        </form>
      </div>
    </div>

    <div id="user_grid" class="grid_content">
      <!-- 用户信息列表GRID -->
      <table id="userview" fit="true" style="width: 100%;">
      </table>
    </div>

    <!-- 添加用户模块 begin -->
    <div id="user_add_dialog" class="easyui-dialog" style="width: 550px; height: 480px; padding: 10px 20px" closed="true">
      <div class="ftitle">用户信息</div>
      <form id="user_add_form" method="post" novalidate class="ftitle_form">
        <div class="fitem fitem_odd">
          <label for="account">账户:</label> 
          <input name="account" id="account" type="text" class="easyui-validatebox"  required="true"  validType="remote['${ctx!}/user/unique.json','account']" invalidMessage="该账户已经存在"> 
        </div>
        <div class="fitem fitem_even">
          <label for="name">用户名:</label> 
          <input name="name" id="name" type="text" class="easyui-validatebox" required="true"> 
        </div>
        <div class="fitem fitem_odd">
          <label for="password">密 码:</label> 
          <input name="password" required="true" id="password" type="password" class="easyui-validatebox"
            validType="minLength[6]">
        </div>
        <div class="fitem fitem_even">
          <label for="repassword">确认密码:</label> 
          <input name="repassword" required="true" id="repassword" type="password" class="easyui-validatebox" 
            validType="equalTo['#user_add_form #password']" invalidMessage="两次输入密码不匹配!">
        </div>
        <div class="fitem fitem_odd">
          <label for="email">E-mail:</label>
          <input name="email" type="text" required="true" class="easyui-validatebox" validType="email" />
        </div>
        <div class="fitem fitem_even">
          <label for="organ">所属机构:</label>
          <input id="comboOrgTreeAdd" type="text" class="easyui-combotree" required="true" width="300px"/>
          <input id="comboOrgTreeAddId" name="comboOrgTreeId" type="hidden"/>
        </div>
        <div class="fitem fitem_odd">
          <label for="position">岗位:</label>
          <input id="positionAdd" type="text"  class="easyui-combobox"/>
          <input id="positionAddId" name="positionId" type="hidden"/>
        </div>
        <div class="fitem fitem_even">
          <label for="organ">兼管机构:</label>
          <input id="comboSupOrgTreeAdd" type="text"  class="easyui-combotree"  width="300px"/>
          <input id="comboSupOrgTreeAddIds" name="comboSupOrgTreeIds" type="hidden"/>
          <input name="active" type="hidden" id="active" value="Y"/>
        </div>
      </form>
    </div>
    <!-- 添加用户模块 end -->

    <!-- 修改用户模块 begin -->
    <div id="user_edit_dialog" class="easyui-dialog" style="width: 550px; height: 480px; padding: 10px 20px" closed="true">
      <div class="ftitle">用户信息</div>
      <form id="user_edit_form" method="post" novalidate class="ftitle_form">
      	<input name="account" type="hidden" />
        <div class="fitem fitem_odd">
          <label for="account">账户:</label> 
          <input name="account" id="account" type="text" class="easyui-validatebox" disabled="disabled">
          <input name="id" type="hidden" />
        </div>
        <div class="fitem fitem_even">
          <label for="name">用户名:</label> 
          <input name="name" id="name" type="text" class="easyui-validatebox" required="true"> 
        </div>
        <div class="fitem fitem_odd">
          <label for="password">密 码:</label> 
          <input name="password_update" id="password_update" type="password" class="easyui-validatebox"
            validType="minLength[6]">
        </div>
        <div class="fitem fitem_even">
          <label for="repassword">确认密码:</label> 
          <input name="password_update" id="repasswordTwo" type="password" class="easyui-validatebox" 
            validType="equalTo['#password_update']" invalidMessage="两次输入密码不匹配!">
          <input name="password" id="passwordEdit" type="hidden"/>
        </div>
        <div class="fitem fitem_odd">
          <label for="email">E-mail:</label>
          <input name="email" type="text" required="true" class="easyui-validatebox" validType="email" />
        </div>
        <div class="fitem fitem_even">
          <label for="organ">所属机构:</label>
          <input id="comboOrgTreeEdit" type="text" class="easyui-combotree" required="true" width="300px"/>
          <input id="comboOrgTreeEditId" name="comboOrgTreeId" type="hidden"/>
        </div>
        <div class="fitem fitem_odd">
          <label for="position">岗位:</label>
          <input id="positionEdit" type="text"  class="easyui-combobox"/>
          <input id="positionEditId" name="positionId" type="hidden"/>
        </div>
        <div class="fitem fitem_even">
          <label for="organ">兼管机构:</label>
          <input id="comboSupOrgTreeEdit" type="text"  class="easyui-combotree"  width="300px"/>
          <input id="comboSupOrgTreeEditIds" name="comboSupOrgTreeIds" type="hidden"/>
           <input name="active" id="active" editable="false" type="hidden"/>
        </div>
      </form>
    </div>
    <!-- 修改用户模块 end -->

    <!-- 用户详细信息 begin -->
    <div id="user_detail_dialog" title="用户信息" class="easyui-dialog" 
      style="width: 800px; height: 400px; padding: 10px 20px" closed="true" buttons="#detail-dlg-buttons">
     <div class="ftitle">用户详细信息</div>
      <form id="user_detail_form" class="detail_form" novalidate>
        <table style="width: 100%; border: none; border: 0;" cellpadding="0" cellspacing="0">
          <tr class="detail_form_odd">
            <td width="20%" class="detail_form_tdl">账户:</td>
            <td width="30%" class="detail_form_tdr"><input name="account" id="account"  readonly="readonly"/></td>
            <td width="20%" class="detail_form_tdl">用户名:</td>
            <td width="30%" class="detail_form_tdr"><input name="name" id="name"  readonly="readonly"/></td>
          </tr>
          <tr>
            <td class="detail_form_tdl">E-mail:</td>
            <td class="detail_form_tdr"><input name="email" id="email"  readonly="readonly"/></td>
            <td class="detail_form_tdl">状态:</td>
            <td class="detail_form_tdr"><input name="active" id="active"  readonly="readonly" data-options="panelHeight:'auto',valueField:'active',textField:'activeView',
			data:[{active:'Y',activeView:'激活'},{active:'N',activeView:'删除'}]"/></td>
          </tr>
          <tr class="detail_form_odd">
          	 <td class="detail_form_tdl">所属机构:</td>
            <td class="detail_form_tdr"><input name="userOrgans" id="userOrgans" readonly="readonly"/></td>
             <td class="detail_form_tdl">岗位:</td>
            <td class="detail_form_tdr"><input name="positions" id="positions" readonly="readonly"/></td>
          </tr>
          <tr>
            <td class="detail_form_tdl">创建人:</td>
            <td class="detail_form_tdr"><input name="insertBy" id="insertBy"  readonly="readonly"/></td>
            <td class="detail_form_tdl">创建时间:</td>
            <td class="detail_form_tdr"><input name="insertDate" id="insertDate"  readonly="readonly"/></td>
          </tr>
         </table>
       </form>
     </div>
     <!-- 用户详细信息 end -->
     
     <!-- 用户角色管理 begin -->
    <div id="role_manage" title="用户角色管理" data-options=""
      style="display: none; position: relative;">
      <div style="padding: 5px 0 5px 30px;" id="role_user_info">用户：张三</div>
      <div style="width: 335px; float: left; margin: 0 0 5px 10px;">
        <div id="new_roles" class="" data-options="closable:false,tools:'#urn_tt'" 
          title="可选角色" style="width: 335px; height: 350px; padding: 10px;">
        </div>
      </div>
      <div style="width: 335px; margin-left: 390px; margin-top: 0; margin-bottom: 5px;">
        <div id="own_roles" class="" data-options="closable:false,tools:'#uro_tt'"
          title="已选角色" style="width: 335px; height: 350px; padding: 10px;">
        </div>
      </div>
      <div style="padding-left: 30px;"><span style="color: red; vertical-align: middle;">*</span>提示：您还可以通过拖动或双击来管理用户的角色。</div>
      <div class="role_mbtn">
        <a title="添加角色" id="add_user_roles">&gt;</a> <br/>
        <a title="删除角色" id="del_user_roles">&lt;</a>
      </div>
    </div>
    <div id="urn_tt">
      <a href="javascript:void(0)" class="role_sbtn" onclick="javascript:selectRoles('new',true)">全选</a>
      <a href="javascript:void(0)" class="role_sbtn" onclick="javascript:selectRoles('new',false)">反选</a>
    </div>
    <div id="uro_tt">
      <a href="javascript:void(0)" class="role_sbtn" onclick="javascript:selectRoles('own', true)">全选</a>
      <a href="javascript:void(0)" class="role_sbtn" onclick="javascript:selectRoles('own', false)">反选</a>
    </div>
    <!-- 用户角色管理 end -->
  </body>
</html>